package com.me.adapter.classadapter;

/**
 * 适配器类
 */
public class VoltageAdapter extends Voltage220V implements IVoltage5V {

    @Override
    public int output5V() {
        //获取到220V电压
        int srcV = output220V();
        System.out.println("获取到" + srcV + "v电压，进行修改");

        // 转为5v
        int dstV = srcV / 44;
        System.out.println("修改为" + dstV + "v电压");
        return dstV;
    }

}
